package 并发编程03.用内存模型来解释线程间通信;

public class ThreadLab {

    private  Integer old;

    public static Object object=new Object();


    public static  String number="";

     static class ThreadA extends Thread{


        public void run(){
            number="a";
            System.out.println("this is threadA"+number);
        }
    }



    static class ThreadB extends Thread{
        public void run(){
            number="b";
            System.out.println("this is threadB"+number);
        }
    }

    public static void main(String[] args) {
        Thread ta=new ThreadA();
        Thread tb=new ThreadB();
        ta.start();
        tb.start();

    }


}
